package com.example.mydemo.status.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.mydemo.cate.entity.Cate;
import com.example.mydemo.status.entity.Status;
import com.example.mydemo.status.mapper.StatusMapper;
import com.example.mydemo.status.service.IStatusService;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service

public class StatusServiceImpl extends ServiceImpl<StatusMapper, Status> implements IStatusService {
    @Override
    public Map<Integer, String> idName() {
        List<Status> statuss = list();
        Map<Integer, String> map = new HashMap<>();
        for (Status status : statuss) {
            map.put(status.getId(), status.getName());
        }
        return map;
    }
}
